const jsDiff = require('diff')
var arr1 = [1,2,3];
var arr2 = [4,5,6,7,8,12,343];

const difference = jsDiff.diffArrays(arr1, arr2);
console.log(difference);